package br.com.jspl.app.ui;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JButton;

public class AcaoButton extends JButton {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public AcaoButton(Action a,boolean usarnome) {
			if(usarnome)setText((String)a.getValue(Action.NAME));
			Icon i = (Icon) a.getValue(Action.SMALL_ICON);
			if (i != null) setIcon(i);
			addActionListener(a);
	}
}
